package xyz.longicorn.driver.pojo;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

import java.util.Set;

@Data
@RedisHash(value = "driver_login_user", timeToLive = 3600) // 保持名称及有效期
public class LoginUser {
    @Id
    private String token;
    @Indexed
    private String account;
    private UserInfo userInfo;

    /**
     * 用户权限
     */
    private Set<String> permissions;
    /**
     * 用户角色
     */
    private Set<String> roles;
}
